﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UFIDA.U8.Portal.Framework.Actions;
using System.Windows.Forms;

namespace LKU8.shoukuan
{
    class Delegate_WanJi_Rd10_Import : IActionDelegate
    {
        #region IActionDelegate 成员

        //代理，和菜单项关联。
        void IActionDelegate.Run(IAction action)
        {
            //action.tag 把实例化的 user control 传过来了。
            //使用时，直接使用 action.tag就可以了。方法要使用public，才可以用。
            WanJi_Rd10_Import us = (WanJi_Rd10_Import)action.Tag;
                switch (action.Id)
                {
                    case "Add":
                        {
                            us.Menu_Add();
                            return;
                        }
                    case "AddHouDao":
                        {
                            us.Menu_AddHouDao();
                            return;
                        }
                    case "del":
                        {
                            us.Menu_Del();
                           
                            return;
                        }
                    case "DelBU8":
                        {
                            us.Menu_DelBU8();
                           
                            return;
                        }


                    case "CheckU8":
                        {
                            us.Menu_CheckU8();

                            return;
                        }
                    case "CheckData":
                        {
                            us.Menu_CheckData();

                            return;
                        }
                        
                    case "MoOrder":
                        {
                            us.Menu_ImportMo();

                            return;
                        }
                    case "WorkHour":
                        {
                            us.Menu_WorkHour();

                            return;
                        }
                    case "Checkall":
                        {
                            us.Menu_Checkall();
                            //us.WaitJs();
                            return;
                        }

                     
                  
                  
                    case "Excel":
                        {
                            us.Menu_Excel();


                            return;
                        }
                    
                    case "savebuju":
                        {
                            us.Menu_SaveBuju();


                            return;
                        }
                    case "delbuju":
                        {
                            us.Menu_DelBuju();


                            return;
                        }
                  
                }
                MessageBox.Show("press a Toolbar ID is '"+ action.Id+"'");
            
        }

        void IActionDelegate.SelectionChanged(IAction action, UFIDA.U8.Portal.Common.Core.ISelection selection)
        {
            //throw new NotImplementedException();
        }

        #endregion
    }
}
